/ Assembly List / LJCNetCommon / CodeTokenizer / IsComment

Namespace - LJCNetCommon


Parameters
text - The text value.

Returns

True if a comment, otherwise false.

Syntax

C#
public Boolean IsComment(String text)

Check if a code comment. (E)

Example

C#
using LJCNetCommon;

var tokenizer = new CodeTokenizer();
string text = " string text = " // This is a comment.";
tokenizer.SetTokens(text);
short tokenIndex = 0;
string token = tokenizer.GetToken(tokenIndex);
bool isComment = tokenizer.IsComment(token);
// Value isComment is true.

Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.